﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Spanner;

namespace SpannerWebSite
{
    internal partial class RefAlerts : Reference
    {
        internal static SpannerChapter TheChapter;

        static RefAlerts()
        {
            var sections = new List<SpannerSection> { };
            var initActs = new List<Act> { };

            Action<string, string, Html> addSection = (title, id, html) =>
            {
                sections.Add(Section(Esc(title), id, html));
            };

            addSection("Alert", "Alert", P(Code("Alert(msg)"), " denotes the JavaScript action ",
                Code("alert(msg)"), "."));

            addSection("Confirm", "Confirm", P(Code("Confirm(msg)"),
                " denotes the JavaScript expression ",
                Code("confirm(msg)"), "."));

            addSection("Prompt", "Prompt", P(Code("Prompt(msg, value)"),
                " denotes the JavaScript expression ",
                Code("prompt(msg, value)"),
                " (the value is optional and defaults to the empty string)."));

            TheChapter = CommonUI.Chapter("Reference - Alerts", "RefAlerts", sections, initActs);
        }
    }
}
